package com.ycd.Service.impl;

import com.ycd.Entity.UserEntity;
import com.ycd.Service.UserEntityService;
import com.ycd.dao.Impl.UserEntityImpl;
import com.ycd.dao.UserEntityDao;

import java.util.List;
import java.util.Map;

public class UserEntityServiceImpl implements UserEntityService {

    private UserEntityDao userEntityDao=new UserEntityImpl();

    @Override
    public void addUser(UserEntity userentity) {
        userEntityDao.addUser(userentity);
    }

    @Override
    public void updateUser(UserEntity userentity) {
        userEntityDao.updateUser(userentity);
    }

    @Override
    public void delUser(int id) {
        userEntityDao.delUser(id);
    }

    @Override
    public List<UserEntity> queryAll() {
        return userEntityDao.queryAll();
    }

    @Override
    public UserEntity getUserById(int id) {
        return userEntityDao.getUserById(id);
    }

    @Override
    public UserEntity getUserByAcct(String acct) {
        return userEntityDao.getUserByAcct(acct);
    }

    @Override
    public boolean getAddReg(String acct) {
        return userEntityDao.getAddReg(acct);
    }

    @Override
    public List<Map<String, String>> queryUser() {
        return userEntityDao.queryUser();
    }

    @Override
    public List<UserEntity> queryAll(int offset, int pageSize, UserEntity user) {
        return userEntityDao.queryAll(offset,pageSize,user);
    }

    @Override
    public int getAllCont() {
        return (userEntityDao.getAllCont());
    }


}
